﻿using System;
using System.Collections;
using System.Collections.Generic;
using TaleWorlds.Core;
using TaleWorlds.Library;
using TaleWorlds.ObjectSystem;
using TaleWorlds.SaveSystem;

namespace TaleWorlds.CampaignSystem.Roster
{
	// Token: 0x02000289 RID: 649
	public class ItemRoster : IReadOnlyList<ItemRosterElement>, IEnumerable<ItemRosterElement>, IEnumerable, IReadOnlyCollection<ItemRosterElement>, ISerializableObject
	{
		// Token: 0x060022CB RID: 8907 RVA: 0x00093EDC File Offset: 0x000920DC
		internal static void AutoGeneratedStaticCollectObjectsItemRoster(object o, List<object> collectedObjects)
		{
			((ItemRoster)o).AutoGeneratedInstanceCollectObjects(collectedObjects);
		}

		// Token: 0x060022CC RID: 8908 RVA: 0x00093EEA File Offset: 0x000920EA
		protected virtual void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
		{
			collectedObjects.Add(this._data);
		}

		// Token: 0x060022CD RID: 8909 RVA: 0x00093EF8 File Offset: 0x000920F8
		internal static object AutoGeneratedGetMemberValue_data(object o)
		{
			return ((ItemRoster)o)._data;
		}

		// Token: 0x060022CE RID: 8910 RVA: 0x00093F05 File Offset: 0x00092105
		internal static object AutoGeneratedGetMemberValue_count(object o)
		{
			return ((ItemRoster)o)._count;
		}

		// Token: 0x170008BB RID: 2235
		public ItemRosterElement this[int index]
		{
			get
			{
				return this._data[index];
			}
		}

		// Token: 0x170008BC RID: 2236
		// (get) Token: 0x060022D0 RID: 8912 RVA: 0x00093F25 File Offset: 0x00092125
		public int Count
		{
			get
			{
				return this._count;
			}
		}

		// Token: 0x060022D1 RID: 8913 RVA: 0x00093F2D File Offset: 0x0009212D
		public ItemRoster()
		{
			this._data = new ItemRosterElement[4];
			this._count = 0;
		}

		// Token: 0x060022D2 RID: 8914 RVA: 0x00093F48 File Offset: 0x00092148
		public ItemRoster(ItemRoster other)
		{
			this._data = new ItemRosterElement[other.Count];
			this._count = 0;
			this.Add(other);
			this.CalculateCachedStats();
		}

		// Token: 0x170008BD RID: 2237
		// (get) Token: 0x060022D3 RID: 8915 RVA: 0x00093F75 File Offset: 0x00092175
		// (set) Token: 0x060022D4 RID: 8916 RVA: 0x00093F7D File Offset: 0x0009217D
		[CachedData]
		public int VersionNo { get; private set; }

		// Token: 0x060022D5 RID: 8917 RVA: 0x00093F88 File Offset: 0x00092188
		private void EnsureLength(int length)
		{
			if (length > 0 && (this._data == null || length > this._data.Length))
			{
				int num = 4;
				if (this._data != null)
				{
					num = this._data.Length * 2;
				}
				ItemRosterElement[] array = new ItemRosterElement[num];
				for (int i = 0; i < this._count; i++)
				{
					array[i] = this._data[i];
				}
				this._data = array;
			}
		}

		// Token: 0x060022D6 RID: 8918 RVA: 0x00093FF4 File Offset: 0x000921F4
		public int FindIndexOfItem(ItemObject item)
		{
			for (int i = 0; i < this._count; i++)
			{
				if (this._data[i].EquipmentElement.Item == item)
				{
					return i;
				}
			}
			return -1;
		}

		// Token: 0x060022D7 RID: 8919 RVA: 0x00094034 File Offset: 0x00092234
		public int FindIndex(Predicate<ItemObject> predicate)
		{
			for (int i = 0; i < this._count; i++)
			{
				if (predicate(this._data[i].EquipmentElement.Item))
				{
					return i;
				}
			}
			return -1;
		}

		// Token: 0x060022D8 RID: 8920 RVA: 0x00094078 File Offset: 0x00092278
		public int FindIndexFirstAfterXthElement(Predicate<ItemObject> predicate, int x)
		{
			for (int i = 0; i < x + this._count; i++)
			{
				if (predicate(this._data[i % this._count].EquipmentElement.Item))
				{
					return i;
				}
			}
			return -1;
		}

		// Token: 0x060022D9 RID: 8921 RVA: 0x000940C4 File Offset: 0x000922C4
		public int FindIndexOfElement(EquipmentElement rosterElement)
		{
			for (int i = 0; i < this._count; i++)
			{
				if (rosterElement.IsEqualTo(this._data[i].EquipmentElement))
				{
					return i;
				}
			}
			return -1;
		}

		// Token: 0x060022DA RID: 8922 RVA: 0x00094100 File Offset: 0x00092300
		private int AddNewElement(ItemRosterElement rosterElement, bool insertAtFront = false)
		{
			int num = this._count + 1;
			this.EnsureLength(num);
			int num2 = this._count;
			this.OnRosterUpdated(ref rosterElement, rosterElement.Amount);
			if (insertAtFront)
			{
				for (int i = this._count; i > 0; i--)
				{
					this._data[i] = this._data[i - 1];
				}
				num2 = 0;
			}
			this._data[num2] = rosterElement;
			this._count = num;
			this.UpdateVersion();
			return num2;
		}

		// Token: 0x060022DB RID: 8923 RVA: 0x0009417E File Offset: 0x0009237E
		public int AddToCounts(ItemObject item, int number)
		{
			if (number == 0)
			{
				return -1;
			}
			return this.AddToCounts(new EquipmentElement(item, null, null, false), number);
		}

		// Token: 0x060022DC RID: 8924 RVA: 0x00094198 File Offset: 0x00092398
		public int AddToCounts(EquipmentElement rosterElement, int number)
		{
			if (number == 0)
			{
				return -1;
			}
			int num = this.FindIndexOfElement(rosterElement);
			if (num < 0)
			{
				if (number < 0)
				{
					Debug.FailedAssert("Trying to delete an element from Item Roster that does not exist!", "C:\\Develop\\MB3\\Source\\Bannerlord\\TaleWorlds.CampaignSystem\\Roster\\ItemRoster.cs", "AddToCounts", 174);
					return -1;
				}
				num = this.AddNewElement(new ItemRosterElement(rosterElement, 0), false);
			}
			this.OnRosterUpdated(ref this._data[num], number);
			ItemRosterElement[] data = this._data;
			int num2 = num;
			data[num2].Amount = data[num2].Amount + number;
			if (this._data[num].Amount <= 0)
			{
				this._data[num] = this._data[this._count - 1];
				this._data[this._count - 1] = ItemRosterElement.Invalid;
				this._count--;
			}
			this.UpdateVersion();
			return num;
		}

		// Token: 0x060022DD RID: 8925 RVA: 0x00094270 File Offset: 0x00092470
		public ItemRosterElement GetElementCopyAtIndex(int index)
		{
			if (index < this._count && index >= 0)
			{
				return this._data[index];
			}
			Debug.FailedAssert("GetElementCopyAtIndex can't find the element in ItemRoster", "C:\\Develop\\MB3\\Source\\Bannerlord\\TaleWorlds.CampaignSystem\\Roster\\ItemRoster.cs", "GetElementCopyAtIndex", 206);
			return ItemRosterElement.Invalid;
		}

		// Token: 0x060022DE RID: 8926 RVA: 0x000942AC File Offset: 0x000924AC
		public ItemObject GetItemAtIndex(int index)
		{
			if (index < this._count && index >= 0)
			{
				return this._data[index].EquipmentElement.Item;
			}
			Debug.FailedAssert("Given index for GetItemAtIndex is not valid in ItemRoster", "C:\\Develop\\MB3\\Source\\Bannerlord\\TaleWorlds.CampaignSystem\\Roster\\ItemRoster.cs", "GetItemAtIndex", 217);
			return null;
		}

		// Token: 0x060022DF RID: 8927 RVA: 0x000942FA File Offset: 0x000924FA
		public int GetElementNumber(int index)
		{
			if (index < this._count && index >= 0)
			{
				return this._data[index].Amount;
			}
			Debug.FailedAssert("Given index for GetElementNumber is not valid in ItemRoster", "C:\\Develop\\MB3\\Source\\Bannerlord\\TaleWorlds.CampaignSystem\\Roster\\ItemRoster.cs", "GetElementNumber", 228);
			return 0;
		}

		// Token: 0x060022E0 RID: 8928 RVA: 0x00094338 File Offset: 0x00092538
		public int GetElementUnitCost(int index)
		{
			if (index < this._count && index >= 0)
			{
				return this._data[index].EquipmentElement.ItemValue;
			}
			Debug.FailedAssert("Given index for GetElementUnitCost is not valid in ItemRoster", "C:\\Develop\\MB3\\Source\\Bannerlord\\TaleWorlds.CampaignSystem\\Roster\\ItemRoster.cs", "GetElementUnitCost", 239);
			return 0;
		}

		// Token: 0x060022E1 RID: 8929 RVA: 0x00094388 File Offset: 0x00092588
		public int GetItemNumber(ItemObject item)
		{
			int num = this.FindIndexOfItem(item);
			if (num >= 0)
			{
				return this._data[num].Amount;
			}
			return 0;
		}

		// Token: 0x060022E2 RID: 8930 RVA: 0x000943B4 File Offset: 0x000925B4
		public void Clear()
		{
			for (int i = 0; i < this._count; i++)
			{
				this._data[i].Clear();
				this._data[i] = ItemRosterElement.Invalid;
			}
			this._count = 0;
			this.CalculateCachedStats();
			ItemRoster.RosterUpdatedEventDelegate rosterUpdatedEvent = this._rosterUpdatedEvent;
			if (rosterUpdatedEvent != null)
			{
				rosterUpdatedEvent(default(ItemRosterElement), 0);
			}
			this.UpdateVersion();
		}

		// Token: 0x060022E3 RID: 8931 RVA: 0x00094424 File Offset: 0x00092624
		public static bool RostersAreIdentical(ItemRoster a, ItemRoster b)
		{
			if (a == b)
			{
				return true;
			}
			if (a == null || b == null)
			{
				return false;
			}
			if (a.Count != b.Count)
			{
				return false;
			}
			for (int i = 0; i < a.Count; i++)
			{
				ItemRosterElement elementCopyAtIndex = a.GetElementCopyAtIndex(i);
				int num = b.FindIndexOfItem(elementCopyAtIndex.EquipmentElement.Item);
				if (num == -1)
				{
					return false;
				}
				ItemRosterElement elementCopyAtIndex2 = b.GetElementCopyAtIndex(num);
				if (elementCopyAtIndex.EquipmentElement.Item != elementCopyAtIndex2.EquipmentElement.Item || elementCopyAtIndex.Amount != elementCopyAtIndex2.Amount || elementCopyAtIndex.EquipmentElement.ItemModifier != elementCopyAtIndex2.EquipmentElement.ItemModifier)
				{
					return false;
				}
			}
			return true;
		}

		// Token: 0x060022E4 RID: 8932 RVA: 0x000944EA File Offset: 0x000926EA
		public IEnumerator<ItemRosterElement> GetEnumerator()
		{
			int num;
			for (int i = 0; i < this.Count; i = num + 1)
			{
				yield return this._data[i];
				num = i;
			}
			yield break;
		}

		// Token: 0x060022E5 RID: 8933 RVA: 0x000944FC File Offset: 0x000926FC
		public int SelectRandomIndex(Func<ItemRosterElement, float> weightFunction)
		{
			List<ValueTuple<int, float>> list = new List<ValueTuple<int, float>>();
			float num = 0f;
			for (int i = 0; i < this.Count; i++)
			{
				float num2 = weightFunction(this._data[i]);
				if (num2 > 1E-05f)
				{
					list.Add(new ValueTuple<int, float>(i, num2));
					num += num2;
				}
			}
			if (list.Count > 0)
			{
				float num3 = MBRandom.RandomFloat * num;
				float num4 = 0f;
				for (int j = 0; j < list.Count; j++)
				{
					num4 += list[j].Item2;
					if (num4 >= num3)
					{
						return list[j].Item1;
					}
				}
				return list[list.Count - 1].Item1;
			}
			return -1;
		}

		// Token: 0x060022E6 RID: 8934 RVA: 0x000945BB File Offset: 0x000927BB
		IEnumerator IEnumerable.GetEnumerator()
		{
			return this.GetEnumerator();
		}

		// Token: 0x060022E7 RID: 8935 RVA: 0x000945C4 File Offset: 0x000927C4
		public IEnumerable<ItemRosterElement> RemoveIf(Func<ItemRosterElement, int> match)
		{
			List<ItemRosterElement> list = new List<ItemRosterElement>();
			for (int i = 0; i < this._count; i++)
			{
				int num = match(this._data[i]);
				if (num > 0)
				{
					if (num > this._data[i].Amount)
					{
						num = this._data[i].Amount;
					}
					list.Add(new ItemRosterElement(this._data[i].EquipmentElement.Item, num, this._data[i].EquipmentElement.ItemModifier));
					this.AddToCounts(this._data[i].EquipmentElement, -num);
				}
			}
			return list;
		}

		// Token: 0x060022E8 RID: 8936 RVA: 0x00094684 File Offset: 0x00092884
		public void Add(IEnumerable<ItemRosterElement> rosterElementList)
		{
			foreach (ItemRosterElement itemRosterElement in rosterElementList)
			{
				this.AddToCounts(itemRosterElement.EquipmentElement, itemRosterElement.Amount);
			}
		}

		// Token: 0x060022E9 RID: 8937 RVA: 0x000946DC File Offset: 0x000928DC
		public void Add(ItemRosterElement itemRosterElement)
		{
			this.AddToCounts(itemRosterElement.EquipmentElement, itemRosterElement.Amount);
		}

		// Token: 0x060022EA RID: 8938 RVA: 0x000946F3 File Offset: 0x000928F3
		public void Remove(ItemRosterElement itemRosterElement)
		{
			this.AddToCounts(itemRosterElement.EquipmentElement, -itemRosterElement.Amount);
		}

		// Token: 0x060022EB RID: 8939 RVA: 0x0009470C File Offset: 0x0009290C
		void ISerializableObject.SerializeTo(IWriter writer)
		{
			writer.WriteInt(this.Count);
			if (this._data != null)
			{
				writer.WriteInt(this._data.Length);
				foreach (ItemRosterElement itemRosterElement in this._data)
				{
					writer.WriteSerializableObject(itemRosterElement);
				}
				return;
			}
			writer.WriteInt(0);
		}

		// Token: 0x060022EC RID: 8940 RVA: 0x0009476C File Offset: 0x0009296C
		void ISerializableObject.DeserializeFrom(IReader reader)
		{
			this._count = reader.ReadInt();
			int num = reader.ReadInt();
			this._data = new ItemRosterElement[num];
			for (int i = 0; i < num; i++)
			{
				this._data[i] = (ItemRosterElement)reader.ReadSerializableObject();
			}
			this.CalculateCachedStats();
		}

		// Token: 0x1400000B RID: 11
		// (add) Token: 0x060022ED RID: 8941 RVA: 0x000947C4 File Offset: 0x000929C4
		// (remove) Token: 0x060022EE RID: 8942 RVA: 0x000947FC File Offset: 0x000929FC
		private event ItemRoster.RosterUpdatedEventDelegate _rosterUpdatedEvent;

		// Token: 0x1400000C RID: 12
		// (add) Token: 0x060022EF RID: 8943 RVA: 0x00094831 File Offset: 0x00092A31
		// (remove) Token: 0x060022F0 RID: 8944 RVA: 0x0009483A File Offset: 0x00092A3A
		public event ItemRoster.RosterUpdatedEventDelegate RosterUpdatedEvent
		{
			add
			{
				this._rosterUpdatedEvent += value;
			}
			remove
			{
				this._rosterUpdatedEvent -= value;
			}
		}

		// Token: 0x060022F1 RID: 8945 RVA: 0x00094844 File Offset: 0x00092A44
		public void UpdateVersion()
		{
			int versionNo = this.VersionNo;
			this.VersionNo = versionNo + 1;
		}

		// Token: 0x060022F2 RID: 8946 RVA: 0x00094864 File Offset: 0x00092A64
		private void OnRosterUpdated(ref ItemRosterElement itemRosterElement, int count)
		{
			ItemObject item = itemRosterElement.EquipmentElement.Item;
			this.TotalValue += item.Value * count;
			if (item.IsTradeGood)
			{
				this.TradeGoodsTotalValue += item.Value * count;
			}
			if (item.HasHorseComponent)
			{
				if (item.HorseComponent.IsPackAnimal && itemRosterElement.EquipmentElement.ItemModifier == null)
				{
					this.NumberOfPackAnimals += count;
				}
				else if (item.HorseComponent.IsMount && itemRosterElement.EquipmentElement.ItemModifier == null)
				{
					this.NumberOfMounts += count;
				}
				else if (item.HorseComponent.IsLiveStock)
				{
					this.NumberOfLivestockAnimals += count;
					this.TotalFood += count * item.HorseComponent.MeatCount;
				}
			}
			else
			{
				if (item.IsFood)
				{
					this.TotalFood += count;
					if (itemRosterElement.Amount == 0 && count > 0)
					{
						int foodVariety = this.FoodVariety;
						this.FoodVariety = foodVariety + 1;
					}
					else if (itemRosterElement.Amount > 0 && itemRosterElement.Amount + count <= 0)
					{
						int foodVariety = this.FoodVariety;
						this.FoodVariety = foodVariety - 1;
					}
				}
				this.TotalWeight += item.Weight * (float)count;
			}
			ItemRoster.RosterUpdatedEventDelegate rosterUpdatedEvent = this._rosterUpdatedEvent;
			if (rosterUpdatedEvent == null)
			{
				return;
			}
			rosterUpdatedEvent(itemRosterElement, count);
		}

		// Token: 0x060022F3 RID: 8947 RVA: 0x000949DC File Offset: 0x00092BDC
		[LoadInitializationCallback]
		public void OnLoadStarted(MetaData metaData)
		{
			ItemRoster.InstanceListForLoadGame.Add(this);
		}

		// Token: 0x060022F4 RID: 8948 RVA: 0x000949EC File Offset: 0x00092BEC
		public static void CalculateCachedStatsOnLoad()
		{
			foreach (ItemRoster itemRoster in ItemRoster.InstanceListForLoadGame)
			{
				ItemRoster.ReplaceInvalidItemsWithTrash(itemRoster);
				ItemRoster.RemoveZeroCountsFromRoster(itemRoster);
				itemRoster.CalculateCachedStats();
			}
			ItemRoster.InstanceListForLoadGame.Clear();
		}

		// Token: 0x060022F5 RID: 8949 RVA: 0x00094A54 File Offset: 0x00092C54
		private static void RemoveZeroCountsFromRoster(ItemRoster itemRoster)
		{
			int num = 0;
			int i = 0;
			if (itemRoster._count != 0 && itemRoster._count > itemRoster._data.Length)
			{
				itemRoster._count = itemRoster._data.Length;
			}
			while (i < itemRoster._count)
			{
				ItemRosterElement itemRosterElement = itemRoster._data[i];
				if (itemRosterElement.Amount > 0)
				{
					if (num != i)
					{
						itemRoster._data[num] = itemRosterElement;
					}
					num++;
				}
				i++;
			}
			for (int j = num; j < itemRoster._count; j++)
			{
				itemRoster._data[j].Clear();
				itemRoster._data[j] = ItemRosterElement.Invalid;
			}
			itemRoster._count = num;
		}

		// Token: 0x060022F6 RID: 8950 RVA: 0x00094B00 File Offset: 0x00092D00
		private static void ReplaceInvalidItemsWithTrash(ItemRoster itemRoster)
		{
			if (itemRoster._data != null)
			{
				for (int i = itemRoster._data.Length - 1; i >= 0; i--)
				{
					ItemModifier itemModifier = itemRoster._data[i].EquipmentElement.ItemModifier;
					if (itemModifier != null && !itemModifier.IsReady)
					{
						itemRoster.AddToCounts(itemRoster._data[i].EquipmentElement.Item, itemRoster._data[i].Amount);
						itemRoster._data[i].Clear();
					}
					ItemObject item = itemRoster._data[i].EquipmentElement.Item;
					if (item != null && !item.IsReady)
					{
						ItemObject item2 = itemRoster._data[i].EquipmentElement.Item;
						itemRoster.AddToCounts(DefaultItems.Trash, itemRoster._data[i].Amount);
						itemRoster._data[i].Clear();
						if (MBObjectManager.Instance.GetObject(item2.Id) == item2)
						{
							MBObjectManager.Instance.UnregisterObject(item2);
						}
					}
				}
			}
		}

		// Token: 0x060022F7 RID: 8951 RVA: 0x00094C30 File Offset: 0x00092E30
		private void CalculateCachedStats()
		{
			this.TotalWeight = 0f;
			this.NumberOfPackAnimals = 0;
			this.NumberOfMounts = 0;
			this.NumberOfLivestockAnimals = 0;
			this.TotalValue = 0;
			this.TradeGoodsTotalValue = 0;
			this.TotalFood = 0;
			this.FoodVariety = 0;
			for (int i = 0; i < this.Count; i++)
			{
				ItemObject item = this._data[i].EquipmentElement.Item;
				int amount = this._data[i].Amount;
				this.TotalValue += item.Value * amount;
				if (item.IsTradeGood)
				{
					this.TradeGoodsTotalValue += item.Value * amount;
				}
				if (item.HasHorseComponent)
				{
					if (item.HorseComponent.IsPackAnimal)
					{
						this.NumberOfPackAnimals += amount;
					}
					else if (item.HorseComponent.IsMount)
					{
						this.NumberOfMounts += amount;
					}
					else if (item.HorseComponent.IsLiveStock)
					{
						this.NumberOfLivestockAnimals += amount;
						this.TotalFood += amount * item.HorseComponent.MeatCount;
					}
				}
				else
				{
					if (item.IsFood)
					{
						this.TotalFood += amount;
						int foodVariety = this.FoodVariety;
						this.FoodVariety = foodVariety + 1;
					}
					this.TotalWeight += item.Weight * (float)amount;
				}
			}
		}

		// Token: 0x170008BE RID: 2238
		// (get) Token: 0x060022F8 RID: 8952 RVA: 0x00094DA8 File Offset: 0x00092FA8
		// (set) Token: 0x060022F9 RID: 8953 RVA: 0x00094DB0 File Offset: 0x00092FB0
		[CachedData]
		public float TotalWeight { get; private set; }

		// Token: 0x170008BF RID: 2239
		// (get) Token: 0x060022FA RID: 8954 RVA: 0x00094DB9 File Offset: 0x00092FB9
		// (set) Token: 0x060022FB RID: 8955 RVA: 0x00094DC1 File Offset: 0x00092FC1
		[CachedData]
		public int TotalFood { get; internal set; }

		// Token: 0x170008C0 RID: 2240
		// (get) Token: 0x060022FC RID: 8956 RVA: 0x00094DCA File Offset: 0x00092FCA
		// (set) Token: 0x060022FD RID: 8957 RVA: 0x00094DD2 File Offset: 0x00092FD2
		[CachedData]
		public int FoodVariety { get; internal set; }

		// Token: 0x170008C1 RID: 2241
		// (get) Token: 0x060022FE RID: 8958 RVA: 0x00094DDB File Offset: 0x00092FDB
		// (set) Token: 0x060022FF RID: 8959 RVA: 0x00094DE3 File Offset: 0x00092FE3
		[CachedData]
		public int TotalValue { get; internal set; }

		// Token: 0x170008C2 RID: 2242
		// (get) Token: 0x06002300 RID: 8960 RVA: 0x00094DEC File Offset: 0x00092FEC
		// (set) Token: 0x06002301 RID: 8961 RVA: 0x00094DF4 File Offset: 0x00092FF4
		[CachedData]
		public int TradeGoodsTotalValue { get; internal set; }

		// Token: 0x170008C3 RID: 2243
		// (get) Token: 0x06002302 RID: 8962 RVA: 0x00094DFD File Offset: 0x00092FFD
		// (set) Token: 0x06002303 RID: 8963 RVA: 0x00094E05 File Offset: 0x00093005
		[CachedData]
		public int NumberOfPackAnimals { get; private set; }

		// Token: 0x170008C4 RID: 2244
		// (get) Token: 0x06002304 RID: 8964 RVA: 0x00094E0E File Offset: 0x0009300E
		// (set) Token: 0x06002305 RID: 8965 RVA: 0x00094E16 File Offset: 0x00093016
		[CachedData]
		public int NumberOfLivestockAnimals { get; private set; }

		// Token: 0x170008C5 RID: 2245
		// (get) Token: 0x06002306 RID: 8966 RVA: 0x00094E1F File Offset: 0x0009301F
		// (set) Token: 0x06002307 RID: 8967 RVA: 0x00094E27 File Offset: 0x00093027
		[CachedData]
		public int NumberOfMounts { get; private set; }

		// Token: 0x04000AA6 RID: 2726
		[SaveableField(0)]
		private ItemRosterElement[] _data;

		// Token: 0x04000AA7 RID: 2727
		[SaveableField(1)]
		private int _count;

		// Token: 0x04000AA8 RID: 2728
		private static readonly List<ItemRoster> InstanceListForLoadGame = new List<ItemRoster>();

		// Token: 0x020005A5 RID: 1445
		// (Invoke) Token: 0x060046C8 RID: 18120
		public delegate void RosterUpdatedEventDelegate(ItemRosterElement item, int count);
	}
}
